package com.css.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 乐企接入状态
 */
@Getter
@AllArgsConstructor
public enum LqJrztEnum {
	SQZ("-1", "申请中"),
	SQSB("-2", "申请失败"),
	YZF("-3", "已作废"),
	DSYDWXY("0", "待使用单位响应"),
	DSL("1", "待受理"),
    BYSL("2", "不予受理"),
    DQR("3", "待确认"),
    QRTG("4", "确认通过"),
    QRBTG("5", "确认不通过"),
    YJC("6", "已解除"),
    YGQ("7", "已过期"),
    YJQ("8", "已拒绝"),
    YCH("9", "已撤回"),
    YSX("10", "已失效"),
    YZT("11", "已暂停"),
    YZZ("12", "已终止"),
    YHF("13", "已恢复"),
    DYQ("14", "待邀请"),
    HFGX("15", "恢复关系"),
    DSYDWSQ("16", "待使用单位授权");

    private final String dm;

    private final String mc;

    public static String getMc(String dm) {
        LqJrztEnum res = Arrays.stream(values())
                .filter(x -> x.getDm().equals(dm))
                .findFirst().orElse(null);
        return res == null ? null : res.getMc();
    }
}
